<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户列表页</title>
</head>
<body>
    <form action="/user/list">
        用户名：<input type="text" name="username"/> &nbsp; &nbsp;
        住址：<input type="text" name="address"/>  &nbsp; &nbsp;
        <input type="submit" value="搜索" />
    </form>
<table border="1" class="table table-bordered table-hover">
    <tr style="background-color:rgb(51, 122, 183);">
        <th style="color:white">ID</th>
        <th style="color:white">用户名</th>
        <th style="color:white">密码</th>
        <th style="color:white">生日</th>
        <th style="color:white">住址</th>
        <th style="color:white">操作</th>
    </tr>
    <tr th:each="user,status : ${userList}" th:style="${status.odd?'background:#f9d2d2':'background:#71c4e5'}">
        <td th:text="${user.id}">1</td>
        <td th:text="${user.username}">张三</td>
        <td th:text="${user.password}">admin</td>
        <!--<td th:text="${user.birthday}">1995-10-10</td>-->
        <td th:text="${#dates.format(user.birthday,'yyyy-MM-dd')}">1995-10-10</td>
        <td th:text="${user.address}">广东</td>
        <td>
            <a class="btn btn-info btn-sm" href="update" th:href="${'/user/userDetail?id='+user.id}">
                <i class="glyphicon glyphicon-pencil"></i>修改
            </a>
            <a class="btn btn-danger btn-sm" href="list" th:href="${'/user/delete?id='+user.id}">
                <i class="glyphicon glyphicon-remove"></i>删除
            </a>
        </td>
    </tr>
    <tr>
        <td colspan="8" align="center">
            <a class="btn btn-success" href="add"><i class="glyphicon glyphicon-plus"></i>新增用户</a>
        </td>
    </tr>
</table>
</body>
</html>